/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Compras.java
 *
 * Created on 20-may-2011, 23:59:03
 */

package GUI;

import Interfaz.InterfazControl;
import javax.swing.ImageIcon;

/**
 *
 * @author Administrador
 */
public class Compras extends javax.swing.JFrame {

    /** Creates new form Compras */
	private  InterfazControl laInterfaz;
    public Compras(InterfazControl laInterfaz) {
		this.laInterfaz=laInterfaz;
        initComponents();
		this.setLocationRelativeTo(null); // Cmabiar icono de java en ventana
        this.setIconImage(new ImageIcon("src/imagenes/marketplus2.png").getImage());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jBCompraenTienda = new javax.swing.JButton();
        jBCompraOnline = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jButtonIrPrincipal = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(415, 350));
        setResizable(false);
        getContentPane().setLayout(null);

        jBCompraenTienda.setText("Compra En Tienda");
        jBCompraenTienda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCompraenTiendaActionPerformed(evt);
            }
        });
        getContentPane().add(jBCompraenTienda);
        jBCompraenTienda.setBounds(50, 140, 150, 23);

        jBCompraOnline.setText("Compra Online");
        jBCompraOnline.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCompraOnlineActionPerformed(evt);
            }
        });
        getContentPane().add(jBCompraOnline);
        jBCompraOnline.setBounds(50, 220, 150, 23);

        jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 16));
        jLabel4.setText("Compras");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(20, 100, 200, 22);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/marketplus.png"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 0, 94, 90);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ComprarTienda.jpg"))); // NOI18N
        getContentPane().add(jLabel2);
        jLabel2.setBounds(260, 130, 100, 60);

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/compraOnline.jpg"))); // NOI18N
        getContentPane().add(jLabel3);
        jLabel3.setBounds(260, 190, 90, 80);

        jLabel5.setFont(new java.awt.Font("Tempus Sans ITC", 3, 18));
        jLabel5.setText(" Market Plus");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(200, 40, 120, 30);

        jLabel6.setFont(new java.awt.Font("Tempus Sans ITC", 3, 18));
        jLabel6.setText("Supermercados");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(190, 10, 150, 30);

        jButtonIrPrincipal.setText("Ir a Pág Principal");
        jButtonIrPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonIrPrincipalActionPerformed(evt);
            }
        });
        getContentPane().add(jButtonIrPrincipal);
        jButtonIrPrincipal.setBounds(233, 270, 140, 23);

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel7.setText("RIF: J-122231245          Desarrollado por: Group Delivery");
        getContentPane().add(jLabel7);
        jLabel7.setBounds(100, 300, 320, 20);

        pack();
    }// </editor-fold>//GEN-END:initComponents

	private void jButtonIrPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonIrPrincipalActionPerformed
		// TODO add your handling code here:
		Principal iraPrincipal=new Principal(laInterfaz);
		iraPrincipal.setVisible(true);
		this.dispose();
	}//GEN-LAST:event_jButtonIrPrincipalActionPerformed

	private void jBCompraOnlineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCompraOnlineActionPerformed
		// TODO add your handling code here:
		VentanaPrincipal registrarcompraonline=new VentanaPrincipal(laInterfaz);
		registrarcompraonline.setVisible(true);
		this.dispose();
	}//GEN-LAST:event_jBCompraOnlineActionPerformed

	private void jBCompraenTiendaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCompraenTiendaActionPerformed
		// TODO add your handling code here:
		CompraTienda irCompraTienda = new CompraTienda(laInterfaz);
		irCompraTienda.setVisible(true);
		this.dispose();
	}//GEN-LAST:event_jBCompraenTiendaActionPerformed

    /**
    * @param args the command line arguments
    */
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBCompraOnline;
    private javax.swing.JButton jBCompraenTienda;
    private javax.swing.JButton jButtonIrPrincipal;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    // End of variables declaration//GEN-END:variables

}
